package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;


//@Component组件  == <bean id="user" class="com.kuang.pojo.User"/>
@Component
@Scope("singleton")
public class User {

    public String name;

    //相当于<property name="name" value="zls"/>
    @Value("zls")
    public void setName(String name) {
        this.name = name;
    }
}
